// 引入基础布局组件
import Layout from '../layout'
// 一级路由挂载在layout上，要有二级路由，才能显示三级路由，所以弄一个空的挂载点
export const active = [
  // 首页
  {
    path: '/',
    component: Layout,
    redirect: '/home',
    children: [{
      path: 'home',
      name: 'Home',
      meta: { title: '首页', icon: 'el-icon-box' },
      component: () => import('@/views/Home/index')
    }]
  },
  // 工单管理  /task
  // ---运营工单  /task/business
  // ---运维工单  /task/operation
  // 一级路由在layout上
  {
    path: '/task',
    component: Layout,
    redirect: '/task/business',
    meta: { title: '工单管理', icon: 'el-icon-tickets' },
    children: [{
      path: 'business',
      name: 'business',
      component: () => import('@/views/task-gd/business'),
      meta: { title: '运营工单', icon: 'dashboard' }
    },
    {
      path: 'operation',
      name: 'operation',
      component: () => import('@/views/task-gd/operation'),
      meta: { title: '运维工单', icon: 'dashboard' }
    }
    ]
  },
  // 点位管理  /node
  // ----区域管理   /node/region
  // ---点位管理   /node/node
  // ---合作商管理  /node/partner
  {
    path: '/node',
    component: Layout,
    redirect: '/node/regio',
    meta: { title: '点位管理', icon: 'el-icon-location-information' },
    children: [{
      path: 'regio',
      name: 'regio',
      component: () => import('@/views/node/regio'),
      meta: { title: '区域管理', icon: 'dashboard' }
    },
    {
      path: 'node',
      name: 'node',
      component: () => import('@/views/node/node'),
      meta: { title: '点位管理', icon: 'dashboard' }
    },
    {
      path: 'partner',
      name: 'partner',
      component: () => import('@/views/node/partner'),
      meta: { title: '合作商管理', icon: 'dashboard' }
    }
    ]

  },
  // 设备管理  /vm
  // ----设备管理     /vm/index
  // ----设备状态     /vm/status
  // ----设备类型管理   /vm/type
  {
    path: '/vm',
    component: Layout,
    redirect: '/vm/index',
    meta: { title: '设备管理', icon: 'el-icon-setting' },
    children: [{
      path: 'index',
      name: 'index',
      component: () => import('@/views/vm/index'),
      meta: { title: '设备管理', icon: 'dashboard' }
    },
    {
      path: 'status',
      name: 'status',
      component: () => import('@/views/vm/status'),
      meta: { title: '设备状态', icon: 'dashboard' }
    },
    {
      path: 'type',
      name: 'type',
      component: () => import('@/views/vm/type'),
      meta: { title: '设备类型管理', icon: 'dashboard' }
    }
    ]

  },
  // 人员管理   /user
  // ----人员列表    /user/index
  // ----人效统计     /user/user-task-stats
  // ----工作量列表   /user/user-work
  {
    path: '/user',
    component: Layout,
    redirect: '/user/index',
    meta: { title: '人员管理', icon: 'el-icon-user' },
    children: [{
      path: 'index',
      // name: 'index',
      component: () => import('@/views/user/index'),
      meta: { title: '人员列表', icon: 'dashboard' }
    },
    {
      path: 'user-task-stats',
      name: 'user-task-stats',
      component: () => import('@/views/user/userTaskStats'),
      meta: { title: '人效统计', icon: 'dashboard' }
    },
    {
      path: 'user-work',
      name: 'user-work',
      component: () => import('@/views/user/userWork'),
      meta: { title: '工作量列表', icon: 'dashboard' }
    }
    ]

  },
  // 商品管理   /sku
  // ----商品类型   /sku/slu-class
  // ----商品管理   /sku/sku
  {
    path: '/sku',
    component: Layout,
    redirect: '/sku/sku-class',
    meta: { title: '商品管理', icon: 'el-icon-goods' },
    children: [{
      path: 'sku-class',
      name: 'skuClass',
      component: () => import('@/views/sku/skuClass'),
      meta: { title: '商品类型', icon: 'dashboard' }
    },
    {
      path: 'sku',
      name: 'sku',
      component: () => import('@/views/sku/sku'),
      meta: { title: '商品管理', icon: 'dashboard' }
    }
    ]
  },
  // 策略管理   /policy/index
  {
    path: '/policy',
    component: Layout,
    redirect: '/policy/index',
    children: [{
      path: 'index',
      name: 'policy',
      component: () => import('@/views/policy'),
      meta: { title: '策略管理', icon: 'el-icon-magic-stick' }
    }]
  },
  // 订单管理   /order/index
  {
    path: '/order',
    component: Layout,
    redirect: '/order/index',
    children: [{
      path: 'index',
      name: 'order',
      component: () => import('@/views/order'),
      meta: { title: '订单管理', icon: 'el-icon-notebook-1' }
    }]
  },
  // 对账统计   /report/index
  {
    path: '/report',
    component: Layout,
    redirect: '/report/index',
    meta: { title: '对账统计', icon: 'el-icon-notebook-2' },
    children: [{
      path: 'index',
      name: 'report',
      component: () => import('@/views/report'),
      meta: { title: '对账统计', icon: 'dashboard' }
    }]
  }
]
